﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.CloudStreaming
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using UnityEngine.Bindings;

#nullable disable
namespace UnityEngine
{
  [NativeHeader("Runtime/Export/CloudStreaming/CloudStreaming.bindings.h")]
  public static class CloudStreaming
  {
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern bool PostMessage(string content);

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern string PeekMessage();

    public static float[] PeekRemoteAudioCapture()
    {
      float[] samples = new float[CloudStreaming.PreloadRemoteAudioCapture()];
      return CloudStreaming.PeekRemoteAudioCapture(samples) ? samples : new float[0];
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern bool EnableMicRecording();

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern bool DisableMicRecording();

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern int PreloadRemoteAudioCapture();

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern bool PeekRemoteAudioCapture([Out] float[] samples);
  }
}
